package com.bkck.sharkblockade.levels.lines;

public class Line {
  private Point point1 = new Point();
  private Point point2 = new Point();
  
  public Line(Point point1, Point point2) {   
    this.point1 = point1;
    this.point2 = point2;
  }
  
  public Line(float x1, float y1, float x2, float y2) {
    point1.setX(x1);
    point1.setY(y1);
    point2.setX(x2);
    point2.setY(y2);
  }
  
  public void setPoint1(Point point1) {
    this.point1 = point1;
  }
  
  public void setPoint1(float x, float y) {
    point1.setX(x);
    point1.setY(y);
  }
  
  public void setPoint2(Point point2) {
    this.point2 = point2;
  }
  
  public void setPoint2(float x, float y) {
    point2.setX(x);
    point2.setY(y);
  }
  
  public Point getPoint1() {
    return point1;
  }
  
  public Point getPoint2() {
    return point2;
  }
  
  public String toString() {
    return point1.toString() + " to " + point2.toString();
  }
}
